sdmdlconstantnode module¶
-
class
sd.api.mdl.sdmdlconstantnode.SDMDLConstantNode(APIContext, handle, *args, **kwargs)¶ Bases:
sd.api.mdl.sdmdlnode.SDMDLNodeClass managing a MDL constant node
-
deleteProperty(sdProperty: sd.api.sdproperty.SDProperty) → None¶ Delete the specified property
- Parameters
sdProperty – The property to remove
-
deletePropertyConnections(sdProperty: sd.api.sdproperty.SDProperty) → None¶ Delete all connections of the specified property
- Parameters
sdProperty – The SDProperty whose connections will be disconnected
-
deletePropertyGraph(sdProperty: sd.api.sdproperty.SDProperty) → None¶ Delete the graph that controls the specified property, and restore the previous constant value
- Parameters
sdProperty – The property from which we want to remove the graph
-
getAnnotationPropertyValueFromId(sdPropertyId: str) → Optional[sd.api.sdvalue.SDValue]¶ Get the value of the annotation property that matches the specified identifier
- Parameters
sdPropertyId – The identifier of the annotation property we want to retrieve
-
getClassName() → str¶ Returns the most specific name of the class this APIObject is
-
getDefinition() → Optional[sd.api.sddefinition.SDDefinition]¶ Get the definition of the node
-
getIdentifier() → str¶ Get the node identifier in the context of its graph
-
getInputPropertyValueFromId(sdPropertyId: str) → Optional[sd.api.sdvalue.SDValue]¶ Get the value of the input property that matches the specified identifier
- Parameters
sdPropertyId – The identifier of the input property we want to retrieve
-
getPosition() → sd.api.sdbasetypes.float2¶ Get the node position within its graph
-
getProperties(sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → sd.api.sdarray.SDArray[sd.api.sdproperty.SDProperty][sd.api.sdproperty.SDProperty]¶ Get all node properties for the specified SDPropertyCategory
- Parameters
sdPropertyCategory – The category of the property
-
getPropertyConnections(sdProperty: sd.api.sdproperty.SDProperty) → sd.api.sdarray.SDArray[sd.api.sdconnection.SDConnection][sd.api.sdconnection.SDConnection]¶ Get all connections of the specified property
- Parameters
sdProperty – The Property we want to retrieve the connections from
-
getPropertyFromId(sdPropertyId: str, sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → Optional[sd.api.sdproperty.SDProperty]¶ Get the property that matches the specified identifier in the specified category
- Parameters
sdPropertyId – The identifier of the property we want to retrieve
sdPropertyCategory – The category of the property
-
getPropertyGraph(sdProperty: SDProperty) → Optional[SDGraph]¶ Get the graph that controls the specified property
- Parameters
sdProperty – The property we want to retrieve the value from
-
getPropertyValue(sdProperty: sd.api.sdproperty.SDProperty) → Optional[sd.api.sdvalue.SDValue]¶ Get the value of the specified node property
- Parameters
sdProperty – The property we want to retrieve the value from
-
getPropertyValueFromId(sdPropertyId: str, sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → Optional[sd.api.sdvalue.SDValue]¶ Get the value of the property that matches the specified identifier in the specified category
- Parameters
sdPropertyId – The identifier of the property we want to retrieve
sdPropertyCategory – The category of the property
-
getReferencedResource() → Optional[sd.api.sdresource.SDResource]¶ Get the SDResource referenced by the current node, if any
-
isExposed() → bool¶ Determine whether the current node is exposed
-
newProperty(sdPropertyIdentifier: str, sdPropertyType: sd.api.sdtype.SDType, sdPropertyCategory: sd.api.sdproperty.SDPropertyCategory) → Optional[sd.api.sdproperty.SDProperty]¶ Create a new property
- Parameters
sdPropertyIdentifier – The identifier of the new property
sdPropertyType – The type of the new property
sdPropertyCategory – The category of the property
-
newPropertyConnection(sdOutputProperty: sd.api.sdproperty.SDProperty, sdInputPropertyNode: sd.api.sdnode.SDNode, sdInputProperty: sd.api.sdproperty.SDProperty) → Optional[sd.api.sdconnection.SDConnection]¶ Create a new connection between an output property of the current node to an input property of another node
- Parameters
sdOutputProperty – The output property from where to start a new connection
sdInputPropertyNode – The other node
sdInputProperty – The input property of the other node that will be connected
-
newPropertyConnectionFromId(sdOutputPropertyId: str, sdInputPropertyNode: sd.api.sdnode.SDNode, sdInputPropertyId: str) → sd.api.sdconnection.SDConnection¶ Create a new connection between an output property of the current node to an input property of a target node based on the properties identifiers
- Parameters
sdOutputPropertyId – The output property identifier from where to start a new connection
sdInputPropertyNode – The other node
sdInputPropertyId – The input property identifier of the other node that will be connected
-
newPropertyGraph(sdProperty: SDProperty, sdGraphTypeId: str) → Optional[SDGraph]¶ Reset the graph that controls the specified property
- Parameters
sdProperty – The property we want to retrieve the value from
sdGraphTypeId – The type name of the graph to create on the property. Supported graph name depends on the node and property
-
release() → None¶ Releases an APIObject
-
setAnnotationPropertyValueFromId(sdAnnotationPropertyId: str, sdValue: sd.api.sdvalue.SDValue) → None¶ Set the value of the specified node annotation property retrieved by his identifier
- Parameters
sdAnnotationPropertyId – The identifier of the annotation property we want to set
sdValue – The value to set
-
setExposed(isExposed: bool) → None¶ Exposed or Unexpose the current node
- Parameters
isExposed – Indicates whether the node is exposed
-
setInputPropertyValueFromId(sdInputPropertyId: str, sdValue: sd.api.sdvalue.SDValue) → None¶ Set the value of the specified node input property retrieved by his identifier
- Parameters
sdInputPropertyId – The identifier of the input property we want to set
sdValue – The value to set
-
setPosition(position: sd.api.sdbasetypes.float2) → None¶ Set the node position within its graph. Note that the X+ is oriented to the right and the Y+ axis is oriented to the bottom.
- Parameters
position – The new node position in the graph
-
setPropertyValue(sdProperty: sd.api.sdproperty.SDProperty, sdValue: sd.api.sdvalue.SDValue) → None¶ Set the value of the specified node property. Note that this operation is not allowed for sdProperty that if the SDProperty.isFunctionOnly() method returns true
- Parameters
sdProperty – The property we want to retrieve the value from
sdValue – The value to set
-